<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-phone-edit" th:object="${phone}">
            <input id="phoneId" name="phoneId" th:field="*{phoneId}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机型号：</label>
                <div class="col-sm-8">
                    <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机品牌：</label>
                <div class="col-sm-8">
                    <input id="type" name="type" th:field="*{type}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机价格：</label>
                <div class="col-sm-8">
                    <input id="price" name="price" th:field="*{price}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机跑分：</label>
                <div class="col-sm-8">
                    <input id="score" name="score" th:field="*{score}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机出厂时间：</label>
                <div class="col-sm-8">
                    <input id="beginTime" name="beginTime" th:field="*{beginTime}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机尺寸：</label>
                <div class="col-sm-8">
                    <input id="size" name="size" th:field="*{size}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">像素：</label>
                <div class="col-sm-8">
                    <input id="px" name="px" th:field="*{px}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">电池：</label>
                <div class="col-sm-8">
                    <input id="battery" name="battery" th:field="*{battery}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">芯片：</label>
                <div class="col-sm-8">
                    <input id="chip" name="chip" th:field="*{chip}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">无线充电：</label>
                <div class="col-sm-8">
                    <input id="wuxian" name="wuxian" th:field="*{wuxian}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">容量：</label>
                <div class="col-sm-8">
                    <input id="volumes" name="volumes" th:field="*{volumes}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">解锁方式：</label>
                <div class="col-sm-8">
                    <input id="fingerprint" name="fingerprint" th:field="*{fingerprint}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">重量：</label>
                <div class="col-sm-8">
                    <input id="weight" name="weight" th:field="*{weight}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">网络格式：</label>
                <div class="col-sm-8">
                    <input id="sim" name="sim" th:field="*{sim}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">充电接口：</label>
                <div class="col-sm-8">
                    <input id="scoket" name="scoket" th:field="*{scoket}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">图片地址：</label>
                <div class="col-sm-8">
                    <input id="img" name="img" th:field="*{img}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">评星分数：</label>
                <div class="col-sm-8">
                    <input id="star" name="star" th:field="*{star}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">评星次数：</label>
                <div class="col-sm-8">
                    <input id="starSumCount" name="starSumCount" th:field="*{starSumCount}" class="form-control" type="text">
                </div>
            </div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/phone"
		$("#form-phone-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			submitHandler: function(form) {
				$.operate.save(prefix + "/edit", $('#form-phone-edit').serialize());
			}
		});
	</script>
</body>
</html>
